﻿<sap:ActivityDesigner x:Class="Vision.Core.ActivityComponents.Common.RangeEnumerationDesigner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="clr-namespace:System;assembly=mscorlib"
    xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities"
    xmlns:sap="clr-namespace:System.Activities.Presentation;assembly=System.Activities.Presentation"
    xmlns:sapc="clr-namespace:System.Activities.Presentation.Converters;assembly=System.Activities.Presentation"
    xmlns:sapv="clr-namespace:System.Activities.Presentation.View;assembly=System.Activities.Presentation"
    xmlns:sqlcleint="clr-namespace:System.Data.SqlClient;assembly=System.Data"
    xmlns:custom="clr-namespace:Vision.Core.ActivityComponents.Common"                      
    Collapsible="True" Icon="{DynamicResource DesignerIcon}">
    <sap:ActivityDesigner.Resources>
        <ResourceDictionary x:Uid="ResourceDictionary_1">
            <sapc:ArgumentToExpressionConverter x:Uid="sadv:ArgumentToExpressionConverter_1" x:Key="argumentToExpressionConverter" />
            <DataTemplate x:Uid="DataTemplate_1" x:Key="ExpandedFileSaveTemplate">
                <StackPanel>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="40" />
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="22"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="24" />
                            <RowDefinition Height="24" />
                            <RowDefinition Height="24" />
                            <RowDefinition Height="24" />
                        </Grid.RowDefinitions>

                        <!-- Inputs Header -->
                        <TextBlock Grid.Row="0" Grid.ColumnSpan="2" Text="Input(s):" FontWeight="Bold" Foreground="Navy" Margin="0,0,0,3" />

                        <!-- ModelItem.Start -->
                        <TextBlock Grid.Row="1" Grid.Column="0" Text="Start:" VerticalAlignment="Center" />
                        <sapv:ExpressionTextBox Grid.Row="1" Grid.Column="1"  MaxLines="1" Margin="7,0,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Center"
                                Expression="{Binding Path=ModelItem.Start, Mode=TwoWay, Converter={StaticResource argumentToExpressionConverter}, ConverterParameter=In}"
                                ExpressionType="{Binding Path=ModelItem.Start.ArgumentType}"
                                OwnerActivity="{Binding Path=ModelItem, Mode=OneWay}" />
                        <custom:TypeBrowserButton  Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center" BrowserType="{Binding Path=ModelItem.Start.ArgumentType}"/>

                        <!-- ModelItem.Stop -->
                        <TextBlock Grid.Row="2" Grid.Column="0" Text="Stop:" VerticalAlignment="Center" />
                        <sapv:ExpressionTextBox Grid.Row="2" Grid.Column="1"  MaxLines="1" Margin="7,0,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Center"
                                Expression="{Binding Path=ModelItem.Stop, Mode=TwoWay, Converter={StaticResource argumentToExpressionConverter}, ConverterParameter=In}"
                                ExpressionType="{Binding Path=ModelItem.Stop.ArgumentType}"
                                OwnerActivity="{Binding Path=ModelItem, Mode=OneWay}" />
                        <custom:TypeBrowserButton  Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center" BrowserType="{Binding Path=ModelItem.Stop.ArgumentType}"/>

                        <!-- ModelItem.Step -->
                        <TextBlock Grid.Row="3" Grid.Column="0" Text="Step:" VerticalAlignment="Center" />
                        <sapv:ExpressionTextBox Grid.Row="3" Grid.Column="1"  MaxLines="1" Margin="7,0,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Center"
                                Expression="{Binding Path=ModelItem.Step, Mode=TwoWay, Converter={StaticResource argumentToExpressionConverter}, ConverterParameter=In}"
                                ExpressionType="{Binding Path=ModelItem.Stop.ArgumentType}"
                                OwnerActivity="{Binding Path=ModelItem, Mode=OneWay}" />
                        <custom:TypeBrowserButton  Grid.Row="3" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center" BrowserType="{Binding Path=ModelItem.Step.ArgumentType}"/>
                    </Grid>
                    <Border BorderThickness="0,0,0,3" Margin="0,5">
                        <Border.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="DarkGray" Offset="0" />
                                <GradientStop Color="White" Offset="1" />
                            </LinearGradientBrush>
                        </Border.BorderBrush>
                    </Border>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100" />
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="22"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <TextBlock Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Text="Body Argument:" Foreground="Gray"/>
                        <TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Path=ModelItem.Body.Argument.Name, Mode=TwoWay}" Margin="7,0,0,0" Foreground="Gray" VerticalAlignment="Center"/>
                        <custom:TypeBrowserButton  Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center" BrowserType="{Binding Path=ModelItem.Body.Argument.Type}"/>
                    </Grid>
                    <!-- Body -->
                    <sap:WorkflowItemPresenter x:Uid="sad:WorkflowItemPresenter_1" AutomationProperties.AutomationId="Activity" IsDefaultContainer="True" HintText="Drop activity here" Item="{Binding Path=ModelItem.Body.Handler, Mode=TwoWay}" AllowedItemType="{x:Type sa:Activity}" MinWidth="100" MinHeight="100" Margin="0,7,0,0"/>
                </StackPanel>
            </DataTemplate>
            <DataTemplate x:Uid="DataTemplate_2" x:Key="CollapsedActivityViewTemplate">
                <Label x:Uid="TextBlock_6" Padding="0,0,0,0" FontStyle="Italic" Foreground="{x:Static SystemColors.GrayTextBrush}" HorizontalAlignment="Center" VerticalAlignment="Center">Double-click to view</Label>
            </DataTemplate>
            <Style x:Uid="Style_1" x:Key="DesignerStyle" TargetType="{x:Type ContentPresenter}">
                <Setter x:Uid="Setter_1" Property="ContentTemplate" Value="{DynamicResource CollapsedActivityViewTemplate}" />
                <Style.Triggers>
                    <DataTrigger x:Uid="DataTrigger_1" Binding="{Binding Path=ShowExpanded}" Value="true">
                        <Setter x:Uid="Setter_2" Property="ContentTemplate" Value="{DynamicResource ExpandedFileSaveTemplate}" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
            <DrawingBrush x:Key="DesignerIcon" Stretch="Uniform">
                <DrawingBrush.Drawing>
                    <DrawingGroup x:Uid="DrawingGroup_110">
                        <DrawingGroup.Children>
                            <GeometryDrawing x:Uid="GeometryDrawing_271" Geometry="F1 M 7.87718,13.5603 L 12.2638,13.5603 12.2638,2.4712 5.01092,2.47998 5.01314,0.334566 5.92015,0.334559 11.2221,0.334571 12.8497,0.33457 C 13.7381,0.343041 14.4557,1.06593 14.4557,1.95635 L 14.4557,14.0532 C 14.4557,14.9489 13.7296,15.675 12.6893,15.6686 L 11.7527,15.6686 8.60544,15.6686 7.88397,15.6686 7.87718,13.5603 Z">
                                <GeometryDrawing.Pen>
                                    <Pen x:Uid="Pen_129" Thickness="0.50007" LineJoin="Round">
                                        <Pen.Brush>
                                            <LinearGradientBrush x:Uid="LinearGradientBrush_112" StartPoint="-0.0324491,0.0986473" EndPoint="1.17235,0.0986473">
                                                <LinearGradientBrush.RelativeTransform>
                                                    <TransformGroup x:Uid="TransformGroup_88">
                                                        <SkewTransform x:Uid="SkewTransform_86" CenterX="-0.0324491" CenterY="0.0986473" AngleX="-25.1511" AngleY="0" />
                                                        <RotateTransform x:Uid="RotateTransform_88" CenterX="-0.0324491" CenterY="0.0986473" Angle="38.3439" />
                                                    </TransformGroup>
                                                </LinearGradientBrush.RelativeTransform>
                                                <LinearGradientBrush.GradientStops>
                                                    <GradientStop x:Uid="GradientStop_331" Color="#FE6C7B96" Offset="0" />
                                                    <GradientStop x:Uid="GradientStop_332" Color="#FF3E4D68" Offset="0.190722" />
                                                    <GradientStop x:Uid="GradientStop_333" Color="#FF11203A" Offset="1" />
                                                </LinearGradientBrush.GradientStops>
                                            </LinearGradientBrush>
                                        </Pen.Brush>
                                    </Pen>
                                </GeometryDrawing.Pen>
                                <GeometryDrawing.Brush>
                                    <LinearGradientBrush x:Uid="LinearGradientBrush_113" StartPoint="-0.0606405,0.0855585" EndPoint="1.19858,0.0855585">
                                        <LinearGradientBrush.RelativeTransform>
                                            <TransformGroup x:Uid="TransformGroup_89">
                                                <SkewTransform x:Uid="SkewTransform_87" CenterX="-0.0606405" CenterY="0.0855585" AngleX="-26.1371" AngleY="0" />
                                                <RotateTransform x:Uid="RotateTransform_89" CenterX="-0.0606405" CenterY="0.0855585" Angle="37.8015" />
                                            </TransformGroup>
                                        </LinearGradientBrush.RelativeTransform>
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop x:Uid="GradientStop_334" Color="#FEB3C2DF" Offset="0.00423729" />
                                            <GradientStop x:Uid="GradientStop_335" Color="#FF8A9DC0" Offset="0.521186" />
                                            <GradientStop x:Uid="GradientStop_336" Color="#FF6279A2" Offset="1" />
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </GeometryDrawing.Brush>
                            </GeometryDrawing>
                            <GeometryDrawing x:Uid="GeometryDrawing_272" Geometry="F1 M 3.75358,11.3377 L 3.75358,7.22885 1.31775,7.22885 4.85779,3.69602 8.59822,7.22885 5.99796,7.22885 5.99796,11.369 3.75358,11.3377 Z">
                                <GeometryDrawing.Pen>
                                    <Pen x:Uid="Pen_130" Thickness="0.50007" LineJoin="Round">
                                        <Pen.Brush>
                                            <LinearGradientBrush x:Uid="LinearGradientBrush_114" StartPoint="0.433192,-0.220171" EndPoint="2.31882,-0.220171">
                                                <LinearGradientBrush.RelativeTransform>
                                                    <TransformGroup x:Uid="TransformGroup_90">
                                                        <SkewTransform x:Uid="SkewTransform_88" CenterX="0.433192" CenterY="-0.220171" AngleX="-2.74543" AngleY="0" />
                                                        <RotateTransform x:Uid="RotateTransform_90" CenterX="0.433192" CenterY="-0.220171" Angle="50.1696" />
                                                    </TransformGroup>
                                                </LinearGradientBrush.RelativeTransform>
                                                <LinearGradientBrush.GradientStops>
                                                    <GradientStop x:Uid="GradientStop_337" Color="#FE6C7B96" Offset="0" />
                                                    <GradientStop x:Uid="GradientStop_338" Color="#FF3E4D68" Offset="0.190722" />
                                                    <GradientStop x:Uid="GradientStop_339" Color="#FF11203A" Offset="1" />
                                                </LinearGradientBrush.GradientStops>
                                            </LinearGradientBrush>
                                        </Pen.Brush>
                                    </Pen>
                                </GeometryDrawing.Pen>
                                <GeometryDrawing.Brush>
                                    <LinearGradientBrush x:Uid="LinearGradientBrush_115" StartPoint="0.428604,-0.267107" EndPoint="2.43984,-0.267107">
                                        <LinearGradientBrush.RelativeTransform>
                                            <TransformGroup x:Uid="TransformGroup_91">
                                                <SkewTransform x:Uid="SkewTransform_89" CenterX="0.428604" CenterY="-0.267107" AngleX="-2.92899" AngleY="0" />
                                                <RotateTransform x:Uid="RotateTransform_91" CenterX="0.428604" CenterY="-0.267107" Angle="50.0767" />
                                            </TransformGroup>
                                        </LinearGradientBrush.RelativeTransform>
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop x:Uid="GradientStop_340" Color="#FEB3C2DF" Offset="0.00423729" />
                                            <GradientStop x:Uid="GradientStop_341" Color="#FF8A9DC0" Offset="0.521186" />
                                            <GradientStop x:Uid="GradientStop_342" Color="#FF6279A2" Offset="1" />
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </GeometryDrawing.Brush>
                            </GeometryDrawing>
                            <GeometryDrawing x:Uid="GeometryDrawing_273" Geometry="F1 M 8.681,14.3204 C 8.75618,14.3204 11.991,14.3204 12.3801,14.3204 13.0277,14.3204 13.0313,13.7219 13.0313,13.2321 13.0313,12.7423 13.0313,3.27391 13.0313,2.5273 13.0313,1.78069 12.7348,1.67563 11.9741,1.67563 11.7726,1.67563 7.1364,1.67563 5.99301,1.67563 5.91283,1.67563 5.97672,1.02144 5.97269,1.00885 8.08969,1.00885 11.8396,1.00885 12.2755,1.00885 13.0475,1.00885 13.6924,1.31121 13.6924,2.57915 13.6924,3.84709 13.6924,13.2547 13.6924,13.8473 13.6924,14.4399 13.1796,15.0057 12.3162,15.0057 11.8259,15.0057 10.3315,15.0057 8.73177,15.0057 8.63997,15.0057 8.70027,14.2993 8.681,14.3204 Z">
                                <GeometryDrawing.Brush>
                                    <LinearGradientBrush x:Uid="LinearGradientBrush_116" StartPoint="0.0708805,0.170603" EndPoint="1.2982,0.170603">
                                        <LinearGradientBrush.RelativeTransform>
                                            <TransformGroup x:Uid="TransformGroup_92">
                                                <SkewTransform x:Uid="SkewTransform_90" CenterX="0.0708805" CenterY="0.170603" AngleX="-32.032" AngleY="0" />
                                                <RotateTransform x:Uid="RotateTransform_92" CenterX="0.0708805" CenterY="0.170603" Angle="30.9491" />
                                            </TransformGroup>
                                        </LinearGradientBrush.RelativeTransform>
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop x:Uid="GradientStop_343" Color="#FEE6EFFF" Offset="0" />
                                            <GradientStop x:Uid="GradientStop_344" Color="#FF95A4BF" Offset="0.36017" />
                                            <GradientStop x:Uid="GradientStop_345" Color="#FF455A7F" Offset="0.792373" />
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </GeometryDrawing.Brush>
                            </GeometryDrawing>
                            <GeometryDrawing x:Uid="GeometryDrawing_274" Geometry="F1 M 4.52885,10.8385 C 4.52885,9.22446 4.52885,6.52972 4.52885,6.52972 L 3.31591,6.52997 4.85779,4.98788 6.37884,6.50913 5.26938,6.50698 C 5.26938,6.50698 5.26938,10.7423 5.26938,10.8174 5.26938,10.8925 4.52688,10.8376 4.52885,10.8385 Z">
                                <GeometryDrawing.Brush>
                                    <LinearGradientBrush x:Uid="LinearGradientBrush_117" StartPoint="1.03988,-0.271097" EndPoint="4.09613,-0.271097">
                                        <LinearGradientBrush.RelativeTransform>
                                            <TransformGroup x:Uid="TransformGroup_93">
                                                <SkewTransform x:Uid="SkewTransform_91" CenterX="1.03988" CenterY="-0.271097" AngleX="-34.7945" AngleY="0" />
                                                <RotateTransform x:Uid="RotateTransform_93" CenterX="1.03988" CenterY="-0.271097" Angle="29.5062" />
                                            </TransformGroup>
                                        </LinearGradientBrush.RelativeTransform>
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop x:Uid="GradientStop_346" Color="#FEE6EFFF" Offset="0" />
                                            <GradientStop x:Uid="GradientStop_347" Color="#FF95A4BF" Offset="0.36017" />
                                            <GradientStop x:Uid="GradientStop_348" Color="#FF455A7F" Offset="0.792373" />
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </GeometryDrawing.Brush>
                            </GeometryDrawing>
                            <GeometryDrawing x:Uid="GeometryDrawing_275" Geometry="F1 M 5.76432,15.5981 L 5.77304,15.5984 C 5.84001,15.5984 5.89688,15.5455 5.89688,15.4785 L 5.89467,13.5917 5.89497,13.583 C 5.89497,13.5161 5.84068,13.4618 5.76919,13.4618 L 5.76848,13.4612 3.88825,13.4616 3.87387,13.4616 C 3.8069,13.4616 3.75439,13.5177 3.75439,13.5847 L 3.7542,13.5936 3.75747,15.4772 C 3.75747,15.5441 3.81176,15.5984 3.87874,15.5984 3.88167,15.5984 3.88458,15.5983 3.88746,15.5981 L 5.76432,15.5981 Z">
                                <GeometryDrawing.Pen>
                                    <Pen x:Uid="Pen_131" Thickness="0.50007" LineJoin="Round">
                                        <Pen.Brush>
                                            <LinearGradientBrush x:Uid="LinearGradientBrush_118" StartPoint="0.0973035,0.0162866" EndPoint="1.28698,0.0162866">
                                                <LinearGradientBrush.RelativeTransform>
                                                    <TransformGroup x:Uid="TransformGroup_94">
                                                        <SkewTransform x:Uid="SkewTransform_92" CenterX="0.0973035" CenterY="0.0162866" AngleX="0.117408" AngleY="0" />
                                                        <RotateTransform x:Uid="RotateTransform_94" CenterX="0.0973035" CenterY="0.0162866" Angle="48.7901" />
                                                    </TransformGroup>
                                                </LinearGradientBrush.RelativeTransform>
                                                <LinearGradientBrush.GradientStops>
                                                    <GradientStop x:Uid="GradientStop_349" Color="#FF66D191" Offset="0" />
                                                    <GradientStop x:Uid="GradientStop_350" Color="#FF094823" Offset="0.987288" />
                                                </LinearGradientBrush.GradientStops>
                                            </LinearGradientBrush>
                                        </Pen.Brush>
                                    </Pen>
                                </GeometryDrawing.Pen>
                                <GeometryDrawing.Brush>
                                    <LinearGradientBrush x:Uid="LinearGradientBrush_119" StartPoint="0.00332032,-0.0968931" EndPoint="1.47105,-0.0968931">
                                        <LinearGradientBrush.RelativeTransform>
                                            <TransformGroup x:Uid="TransformGroup_95">
                                                <SkewTransform x:Uid="SkewTransform_93" CenterX="0.00332032" CenterY="-0.0968931" AngleX="0.144879" AngleY="0" />
                                                <RotateTransform x:Uid="RotateTransform_95" CenterX="0.00332032" CenterY="-0.0968931" Angle="48.8038" />
                                            </TransformGroup>
                                        </LinearGradientBrush.RelativeTransform>
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop x:Uid="GradientStop_351" Color="#FF7AE5A5" Offset="0" />
                                            <GradientStop x:Uid="GradientStop_352" Color="#FF319459" Offset="0.995763" />
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </GeometryDrawing.Brush>
                            </GeometryDrawing>
                            <GeometryDrawing x:Uid="GeometryDrawing_276" Geometry="F1 M 5.17951,14.9363 L 5.19574,14.9364 C 5.2213,14.9364 5.23011,14.9227 5.23011,14.8971 L 5.22926,14.1704 5.22938,14.1571 C 5.22938,14.1316 5.21719,14.1209 5.1899,14.1209 L 5.1811,14.1207 4.45489,14.1208 4.44969,14.1207 C 4.42412,14.1207 4.41225,14.133 4.41225,14.1586 L 4.41225,14.163 4.4135,14.9022 C 4.4135,14.9277 4.42599,14.9364 4.45156,14.9364 4.45268,14.9364 4.46201,14.9364 4.46311,14.9363 L 5.17951,14.9363 Z">
                                <GeometryDrawing.Brush>
                                    <LinearGradientBrush x:Uid="LinearGradientBrush_120" StartPoint="0.0529445,0.0925575" EndPoint="1.4297,0.0925575">
                                        <LinearGradientBrush.RelativeTransform>
                                            <TransformGroup x:Uid="TransformGroup_96">
                                                <SkewTransform x:Uid="SkewTransform_94" CenterX="0.0529445" CenterY="0.0925575" AngleX="0.146041" AngleY="0" />
                                                <RotateTransform x:Uid="RotateTransform_96" CenterX="0.0529445" CenterY="0.0925575" Angle="45.7316" />
                                            </TransformGroup>
                                        </LinearGradientBrush.RelativeTransform>
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop x:Uid="GradientStop_353" Color="#FF7AE5A5" Offset="0" />
                                            <GradientStop x:Uid="GradientStop_354" Color="#FF319459" Offset="0.995763" />
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </GeometryDrawing.Brush>
                            </GeometryDrawing>
                        </DrawingGroup.Children>
                    </DrawingGroup>
                </DrawingBrush.Drawing>
            </DrawingBrush>
        </ResourceDictionary>
    </sap:ActivityDesigner.Resources>
    <ContentPresenter x:Uid="ContentPresenter_1" Style="{DynamicResource DesignerStyle}" Content="{Binding}" />
</sap:ActivityDesigner>
